<?php $this->context->layout = 'form';?>

<form class="form-horizontal m" id="form-admin-edit">
    <?= \common\widgets\FormInput::widget(['name'=>'input','extend'=>['name'=>'id','type'=>'hidden','info'=>$info]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'forminput|名称','extend'=>['name'=>'title','required'=>1,'info'=>$info]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'forminput|天数','extend'=>['name'=>'days','type'=>'number','required'=>1,'info'=>$info]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'forminput|价格','extend'=>['name'=>'amount','type'=>'number','required'=>1,'info'=>$info]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'forminput|排序','extend'=>['type'=>'number','name'=>'sort','tips'=>'排序值越大越靠前','info'=>$info]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'formradio|状态','extend'=>['name'=>'status','required'=>1,'info'=>$info]])?>

</form>

<?php $this->beginBlock('script'); ?>
    <script>
        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(oesUrl, $('#form-admin-edit').serialize());
            }
        }
    </script>
<?php $this->endBlock(); ?>
